package com.itheima.controller;

import com.itheima.service.HuanXinService;
import com.itheima.vo.HuanXinUserVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/huanxin")
//环信交互层
public class HuanXinController {

    @Autowired
    private HuanXinService huanXinService;

    //查询环信用户
    @GetMapping("/user")
    public ResponseEntity user(){
        HuanXinUserVo vo = huanXinService.findHuanXinUser();

        return ResponseEntity.ok(vo);
    }
}
